#coding:utf-8
import threading
import os
from Rudp import Server
s = Server.server(65507,'127.0.0.1',8080)

def stdout():
    while True:
        result = s.RecvData()
        if not result:
            continue
        print(result.decode())

threading.Thread(target=stdout).start()
print('wait')
while True:
    c = input()
    s.SendTo(c.encode('GBK'),s.client_addr)
